#include "experimentresultui.h"

ExperimentResultUI::ExperimentResultUI() {
    // 初始化
    this->setResizeMode(QQuickWidget::SizeRootObjectToView);
    this->setSource(QUrl("qrc:/experimentresult.qml"));
    rootObj = this->getRootObject();
    if(rootObj){
        connect(rootObj, SIGNAL(prevPage()), this, SIGNAL(prevPage()));
        connect(rootObj, SIGNAL(nextPage()), this, SIGNAL(nextPage()));
    }
}

ExperimentResultUI::~ExperimentResultUI() {}

/**
 * @brief getContext 获取qmlcontext
 * @return qmlContext
 */
QQmlContext* ExperimentResultUI::getContext() const
{
    return this->rootContext();
}

/**
 * @brief getRootObject 获取rootObject
 * @return rootObject
 */
QObject* ExperimentResultUI::getRootObject() const
{
    return (QObject*)this->rootObject();
}
